package com.koro.feign;

import com.koro.dto.FindUsersDTO;
import com.koro.vo.FindUsersVO;
import com.koro.vo.ResponseObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "shop-service-users")
public interface UsersFeigunClient {

    @PostMapping("/user/findById")
    ResponseObject<FindUsersVO> findById(@RequestBody FindUsersDTO dto);

    @GetMapping("/user/findAll")
    ResponseObject<List<FindUsersVO>> findAll(@RequestParam("type") Integer type);

}
